# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer:
pkgname=meep
pkgver=1.3
pkgrel=8
pkgdesc="free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems"
url="http://ab-initio.mit.edu/wiki/index.php/Meep"
arch="x86_64 x86 ppc64le s390x"
license="GPL-2.0-or-later"
makedepends="$depends_dev harminv-dev>=1.4.1-r3 openblas-dev>=0.3.0 libctl-dev guile-dev
	hdf5-dev gsl-dev gfortran gmp-dev fftw-dev"
# Omit -doc because it requires latex2html to build
subpackages="$pkgname-dev"
source="http://ab-initio.mit.edu/meep/meep-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-portable-binary \
		--with-blas=openblas --with-lapack=openblas
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="4ad8d68f27d9971fe6dd4b8440f78d5b141fe747a80c50da55ecbc56a5beb0c2d31441fb46b54cac3c62d4cb34cb1ce6819c06bd2c54bc35f129ba683dc84aea  meep-1.3.tar.gz"
